<template>
  <div class="app-container home">
    <el-row :gutter="20">
      <!-- 系统介绍 -->
      <el-col :sm="24" :lg="12" style="padding-left: 20px">
        <h2>脆血健康证管理系统</h2>
        <p>
          脆血健康证管理系统是一款专注于血液病患者健康管理的专业平台，旨在为医疗机构、医护人员与患者之间提供高效、安全的信息交互服务。通过数字化管理，实现健康档案、就诊记录、用药提醒、健康评估等功能的一站式服务。
        </p>
        <p>
          <b>当前版本:</b> <span>v{{ version }}</span>
        </p>
        <p>
          <el-tag type="success">开源免费</el-tag>
        </p>
        <p>
          <el-button
            type="primary"
            icon="Cloudy"
            plain
            @click="goTarget('https://github.com/yourname/CuiXue-HealthCert')"
            >访问GitHub</el-button
          >
          <el-button
            icon="HomeFilled"
            plain
            @click="goTarget('https://healthcert.example')"
            >访问官网</el-button
          >
        </p>
      </el-col>

      <!-- 技术选型 -->
      <el-col :sm="24" :lg="12" style="padding-left: 50px">
        <el-row>
          <el-col :span="12">
            <h2>技术选型</h2>
          </el-col>
        </el-row>
        <el-row>
          <el-col :span="6">
            <h4>后端技术</h4>
            <ul>
              <li>Spring Boot</li>
              <li>Spring Security</li>
              <li>JWT</li>
              <li>MyBatis Plus</li>
              <li>Druid</li>
              <li>Fastjson</li>
              <li>MongoDB / MySQL</li>
              <li>Redis</li>
              <li>RabbitMQ</li>
              <li>...</li>
            </ul>
          </el-col>
          <el-col :span="6">
            <h4>前端技术</h4>
            <ul>
              <li>Vue 3</li>
              <li>Vite</li>
              <li>Element Plus</li>
              <li>Axios</li>
              <li>Sass</li>
              <li>Quill 富文本编辑器</li>
              <li>Vuex + Vue Router</li>
              <li>TypeScript</li>
              <li>...</li>
            </ul>
          </el-col>
        </el-row>
      </el-col>
    </el-row>

    <el-divider />

    <el-row :gutter="20">
      <!-- 联系信息 -->
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <template v-slot:header>
            <div class="clearfix">
              <span>联系信息</span>
            </div>
          </template>
          <div class="body">
            <p><i class="el-icon-s-promotion"></i> 官网：<el-link href="https://healthcert.example" target="_blank">https://healthcert.example</el-link></p>
            <p><i class="el-icon-user-solid"></i> QQ群：<a href="https://example.com/qqgroup" target="_blank">加入官方QQ群</a></p>
            <p><i class="el-icon-chat-dot-round"></i> 微信公众号：<a href="javascript:void(0)">CuiXueHealth</a></p>
            <p><i class="el-icon-money"></i> 支付宝捐赠：<a href="javascript:void(0)">/ *脆血健康团队</a></p>
          </div>
        </el-card>
      </el-col>

      <!-- 更新日志 -->
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <template v-slot:header>
            <div class="clearfix">
              <span>更新日志</span>
            </div>
          </template>
          <el-collapse accordion>
            <el-collapse-item title="v1.2.0 - 2025-05-20">
              <ol>
                <li>新增患者健康数据可视化看板</li>
                <li>优化患者随访计划推送机制</li>
                <li>修复导出PDF格式异常问题</li>
                <li>升级 Element Plus 到最新版</li>
                <li>增加移动端适配响应布局</li>
              </ol>
            </el-collapse-item>
            <el-collapse-item title="v1.1.0 - 2025-04-10">
              <ol>
                <li>新增电子健康证申请流程</li>
                <li>支持OCR识别上传身份证件</li>
                <li>完善角色权限控制模块</li>
                <li>优化登录安全策略，集成验证码验证</li>
              </ol>
            </el-collapse-item>
            <el-collapse-item title="v1.0.0 - 2025-03-01">
              <ol>
                <li>系统正式上线</li>
                <li>基础数据管理模块开发完成</li>
                <li>用户注册与登录流程部署</li>
                <li>支持健康证申请、审核、发放全流程</li>
              </ol>
            </el-collapse-item>
          </el-collapse>
        </el-card>
      </el-col>

      <!-- 捐赠支持 -->
      <el-col :xs="24" :sm="24" :md="12" :lg="8">
        <el-card class="update-log">
          <template v-slot:header>
            <div class="clearfix">
              <span>捐赠支持</span>
            </div>
          </template>
          <div class="body">
            <p>如果您觉得这个项目不错，希望您能请作者喝杯咖啡表示鼓励。</p>
            <p>&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;微信扫一扫&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;&emsp;支付宝扫一扫</p>
            <img src="@/assets/images/wx.jpg" alt="donate" style="width: 50%" />
             <img src="@/assets/images/zfb.jpg" alt="donate" style="width: 50%" />
            <span style="display: inline-block; height: 30px; line-height: 30px;">你的支持是我们持续开发的动力！</span>
          </div>
        </el-card>
      </el-col>
    </el-row>
  </div>
</template>

<script setup name="Index">
import { ref } from 'vue'

const version = ref('1.2.0')

function goTarget(url) {
  window.open(url, '__blank')
}
</script>

<style scoped lang="scss">
.home {
  font-family: "open sans", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 13px;
  color: #676a6c;
  overflow-x: hidden;

  blockquote {
    padding: 10px 20px;
    margin: 0 0 20px;
    font-size: 17.5px;
    border-left: 5px solid #eee;
  }

  hr {
    margin-top: 20px;
    margin-bottom: 20px;
    border: 0;
    border-top: 1px solid #eee;
  }

  ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
  }

  h4 {
    margin-top: 0;
  }

  h2 {
    margin-top: 10px;
    font-size: 26px;
    font-weight: 100;
  }

  p {
    margin-top: 10px;
    b {
      font-weight: 700;
    }
  }

  .update-log {
    ol {
      display: block;
      list-style-type: decimal;
      margin-block-start: 1em;
      margin-block-end: 1em;
      margin-inline-start: 0;
      margin-inline-end: 0;
      padding-inline-start: 40px;
    }
  }
}
</style>